<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-ui-1.8.17.custom.min.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.multiselect.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.multiselect.filter.js"></script>
	<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.hoverIntent.minified.js"></script>
	<?php $cs=Yii::app()->clientScript;
$cs->scriptMap=array(
    'jquery.js'=>false,
    'jquery.min.js'=>false
);?>	
	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->
	
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery-ui-1.8.17.custom.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery.multiselect.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/jquery.multiselect.filter.css" />

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
	<!-- Dropdown Starts -->
<script type="text/javascript">
$(document).ready(function() {
	function megaHoverOver(){
		$(this).find(".sub").stop().fadeTo('fast', 1).show();
			
		//Calculate width of all ul's
		(function($) { 
			jQuery.fn.calcSubWidth = function() {
				rowWidth = 0;
				//Calculate row
				$(this).find("ul").each(function() {					
					rowWidth += $(this).width(); 
				});	
			};
		})(jQuery); 
		
		if ( $(this).find(".row").length > 0 ) { //If row exists...
			var biggestRow = 0;	
			//Calculate each row
			$(this).find(".row").each(function() {							   
				$(this).calcSubWidth();
				//Find biggest row
				if(rowWidth > biggestRow) {
					biggestRow = rowWidth;
				}
			});
			//Set width
			$(this).find(".sub").css({'width' :biggestRow});
			$(this).find(".row:last").css({'margin':'0'});
			
		} else { //If row does not exist...
			
			$(this).calcSubWidth();
			//Set Width
			$(this).find(".sub").css({'width' : rowWidth});
			
		}
	}
	
	function megaHoverOut(){ 
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  $(this).hide(); 
	  });
	}


	var config = {    
		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 100, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 500, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};

	$("ul#topnav li .sub").css({'opacity':'0'});
	$("ul#topnav li").hoverIntent(config);
});
</script>
    <!-- Dropdown Ends -->
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div id="page">

	<div id="header" class="heading_bg">
		<div id="logo"><a href="<?php echo Yii::app()->request->baseUrl;?>"><!--<img src="<?php //echo Yii::app()->request->baseUrl; ?>/images/youthconnect.png" alt="YouthConnect" title="YouthConnect" style="height: 93px;width: 229px;"/> !--></a>
<?php // echo CHtml::encode(Yii::app()->name); ?><br /><span class="username"></span></div>
	
<?php
	if(ApplicationSessions::run()->read('type')=="admin")
	{
		echo '<div class="login_wrapper">';	
		echo "<p>Welcome!<b>".ApplicationSessions::run()->read('admin_username')."</b></p>";
	 	echo CHtml::link(Yii::app()->getModule('admin')->t("Logout").' ',Yii::app()->getModule('admin')->logoutUrl, array('class'=>'logout')); 
		echo '</div>';	
	}
 ?>
	</div><!-- header -->
	
	
	<?php 
		$userManage = null;
		$profileManage = null;
		$emailTemplateTop=null;
		$staticpagesTop=null;
		$bannerDetailsTop=null;
		$videoTop=null;
		$jobTop=null;
		$offerTop = null;
		$pollTop = null;
		$accessTop = null;
		$locationsTop=null;
		$dashboard=null;
		$vendorstoreTop=null;
		$testimonialTop=null;
		if(isset(Yii::app()->params['top']))
			{
				if(Yii::app()->params['top']=='dashboard')
					{
						$dashboard = 'class="selected"';
					}
				if(Yii::app()->params['top']=='userManage')
					{
						$userManage = 'class="selected"';
					}
				if(Yii::app()->params['top']=='profileManage')
					{
						$profileManage = 'class="selected"';
					}
				if(Yii::app()->params['top']=='emailTemplateTop')
					{
						$emailTemplateTop = 'class="selected"';
					}
				if(Yii::app()->params['top']=='staticPagesTop')
					{
						$staticpagesTop = 'class="selected"';
					}
				if(Yii::app()->params['top']=='bannerDetailsTop')
					{
						$bannerDetailsTop = 'class="selected"';
					}
				if(Yii::app()->params['top']=='videoTop')
					{
						$videoTop = 'class="selected"';
					}	
				if(Yii::app()->params['top']=='jobTop')
					{
						$jobTop = 'class="selected"';
					}
				if(Yii::app()->params['top']=='pollTop')
					{
						$pollTop = 'class="selected"';
					}
				if(Yii::app()->params['top']=='locationsTop')
					{
						$locationsTop = 'class="selected"';
					}
				if(Yii::app()->params['top']=='vendorstoreTop')
					{
						$vendorstoreTop = 'class="selected"';
					}	
				if(Yii::app()->params['top']=='accessTop')
					{
						$accessTop = array('class'=>'selected');
					}
			if(Yii::app()->params['top']=='offerTop')
					{
						$offerTop = array('class'=>'selected');
					}
			if(Yii::app()->params['top']=='testimonialTop')
					{
						$testimonialTop = array('class'=>'selected');
					}
				
			}
	
	?>
	<?php if(ApplicationSessions::run()->read('type')=="admin"){?>
        <ul id="topnav">
         <li <?php echo $dashboard;?>><a href="<?php echo ApplicationConfig::getURL("admin", "cpanel", "index");?>">Home</a>
        </li >
        <li <?php echo $profileManage;?>><a href="<?php echo ApplicationConfig::getURL("admin", "profile", "profile");?>">My Profile</a>
        <div style="opacity: 0; display: none;" class="sub">
            	<ul>
                	<li><a href="<?php echo ApplicationConfig::getURL("admin", "profile", "edit");?>">Edit Profile</a></li>
                    <li><a href="<?php echo ApplicationConfig::getURL("admin", "profile", "changepassword");?>">Change Password</a></li>
                </ul>
        </div>
        </li>
        
        
        <li <?php echo $videoTop;?>><a href="<?php echo yii::app()->createUrl('admin/video')?>">Video Management</a>
         <div style="opacity: 0; display: none;" class="sub">
            	<ul>
                	<li><a href="<?php echo yii::app()->createUrl('admin/video/index')?>">Video List</a></li>
					<li><a href="<?php echo yii::app()->createUrl('admin/video/create')?>">Upload Video</a></li>
                </ul>
        </div>
        </li>

       
        <li <?php echo $jobTop;?>><a href="#">Job Portal</a>
         <div style="opacity: 0; display: none;" class="sub">
            	<ul>		     
               <li><a href="<?php echo yii::app()->createUrl('admin/job/index')?>">Job List</a></li>
		<li><a href="<?php echo yii::app()->createUrl('admin/job/create')?>">Create Job</a></li>
					
                </ul>
        </div>
        </li>
        <li <?php //echo $jobTop;?>><a href="#">Job Type</a>
         <div style="opacity: 0; display: none;" class="sub">
            	<ul>		     
               <li><a href="<?php echo yii::app()->createUrl('admin/jobtype/index')?>">Job Type List</a></li>
		<li><a href="<?php echo yii::app()->createUrl('admin/jobtype/create')?>">Create Job Type</a></li>
					
                </ul>
        </div>
        </li>
        <li <?php //echo $jobTop;?>><a href="#">Test Series</a>
         <div style="opacity: 0; display: none;" class="sub">
            	<ul>		     
               <li><a href="<?php echo yii::app()->createUrl('admin/quiz/admin')?>">View Tests</a></li>
		            <li><a href="<?php echo yii::app()->createUrl('admin/quiz/create')?>">Create Test</a></li>
					
                </ul>
        </div>
        </li>
        <li <?php //echo $jobTop;?>><a href="<?php echo yii::app()->createUrl('admin/article/admin')?>">Articles</a>
         
        </li>
       <li <?php //echo $jobTop;?>><a href="<?php echo yii::app()->createUrl('admin/experts/admin')?>">Experts</a>
         
        </li>             
		
        </ul>
    <?php }?>
		
    <div class="container">
		<?php echo $content; ?>
    </div>

	<div id="footer">
		<!--Copyright &copy; <?php //echo date('Y'); ?>. <br/>
		YouthConnect.--><br/>
	</div><!-- footer -->

</div><!-- page -->

</body>
</html>